﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="User.aspx.vb" Inherits="ExpWeb.User" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="row">
        <div class="col-md-2">
            <h3>User</h3>
        </div>
        <div class="col-md-10">
            <asp:Label ID="lblStatus" runat="server" Width="131px"></asp:Label>
        </div>
    </div>

    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="view0" runat="server">

            <div class="row">
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>User :</label>
                        <asp:DropDownList ID="ddlUsernameView0" runat="server" CssClass="form-control">
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Role :</label>
                        <asp:DropDownList ID="ddlRoleView0" runat="server" CssClass="form-control"></asp:DropDownList>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>First Name :</label>
                        <asp:TextBox ID="txtFirstNameView0" runat="server" CssClass="form-control"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Last Name :</label>
                        <asp:TextBox ID="txtLastNameView0" runat="server" CssClass="form-control"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Mobile Phone :</label>
                        <asp:TextBox ID="txtMobilePhoneView0" runat="server" CssClass="form-control"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Email :</label>
                        <asp:TextBox ID="txtEmailView0" runat="server" CssClass="form-control"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Address :</label>
                        <asp:TextBox ID="txtAddressView0" runat="server" CssClass="form-control"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-3 col-md-3 col-lg-3">
                    <div class="form-group">
                        <label>Status :</label>
                        <asp:DropDownList ID="ddlStatusView0" runat="server" CssClass="form-control">
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="col-sm-12 text-center">
                    <asp:Button ID="btnSearchView0" runat="server" Text="Search" CssClass="btn btn-default" />
                </div>
            </div>

            <div class="row" style="margin-bottom: 5px;">
                <div class="col-lg-12 text-right">
                    <asp:LinkButton ID="ingAddView0" runat="server" CommandArgument="View1" CommandName="SwitchViewByID" CssClass="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Add</asp:LinkButton>
                </div>
            </div>

            <div class="row" style="margin-bottom:60px;">
                <div class="col-lg-12">
                    <asp:GridView ID="grdView0" runat="server" DataKeyNames="User_ID" AutoGenerateColumns="False" CssClass="table table-hover" GridLines="None">
                        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                        <Columns>
                            <asp:TemplateField HeaderText="">
                                <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                                <HeaderTemplate>
                                    <center>Edit</center>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ToolTip="Edit" CommandName="edit" CommandArgument='<%#Eval("User_ID")%>' ID="btnEdit">
                                <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="">
                                <HeaderTemplate>
                                    <center>Delete</center>
                                </HeaderTemplate>
                                <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("User_ID")%>' ID="btnDelete" OnClientClick="return confirm('Make sure, Delete this one?');">
                                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="">
                                <HeaderTemplate>
                                    <center>Detail</center>
                                </HeaderTemplate>
                                <ItemStyle Width="26px" VerticalAlign="top" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ToolTip="More Detail" CommandName="detail" CommandArgument='<%#Eval("User_ID")%>' ID="btnDetail">
                                <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField Visible="false" >
                                <HeaderTemplate>
                                    <center>No.</center>
                                </HeaderTemplate>
                                <ItemStyle Width="4%" VerticalAlign="top" HorizontalAlign="Center" />
                                <ItemTemplate><%# Eval("User_ID")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>User Name</center>
                                </HeaderTemplate>
                                <ItemStyle Width="15%" VerticalAlign="top" HorizontalAlign="Left" />
                                <ItemTemplate><%# Eval("UserName")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Full Name</center>
                                </HeaderTemplate>
                                <ItemStyle Width="30%" VerticalAlign="top" HorizontalAlign="Left" />
                                <ItemTemplate><%# Eval("FullName")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Mobile Phone</center>
                                </HeaderTemplate>
                                <ItemStyle Width="12%" VerticalAlign="top" HorizontalAlign="left" />
                                <ItemTemplate><%# Eval("MobilePhone")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Email</center>
                                </HeaderTemplate>
                                <ItemStyle Width="14%" VerticalAlign="top" HorizontalAlign="left" />
                                <ItemTemplate><%# Eval("Email")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Role</center>
                                </HeaderTemplate>
                                <ItemStyle Width="10%" VerticalAlign="top" HorizontalAlign="center" />
                                <ItemTemplate><%# Eval("RoleName")%></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Status</center>
                                </HeaderTemplate>
                                <ItemStyle Width="10%" VerticalAlign="top" HorizontalAlign="left" />
                                <ItemTemplate>
                                    <center><%# IIf(Eval("isActive") = True, "Active", "Inactive")%></center>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </div>
        </asp:View>

        <asp:View ID="view1" runat="server">

            <div class="col-lg-10 col-lg-offset-1" style="margin-bottom:50px;">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <asp:Label ID="lblPanelHeader" runat="server" Text="Add/Edit User"></asp:Label>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>User name :</label>
                                    <asp:TextBox MaxLength="20" ID="txtUserNameView1" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Password :</label>
                                    <asp:TextBox ID="txtPasswordView1" MaxLength="12" TextMode="Password" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Role :</label>
                                    <asp:DropDownList ID="ddlRoleView1" runat="server" CssClass="form-control"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Title Name :</label>
                                    <asp:TextBox ID="txtTitleNameView1" MaxLength="20" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>First Name :</label>
                                    <asp:TextBox ID="txtFirstNameView1" MaxLength="40" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Last Name :</label>
                                    <asp:TextBox ID="txtLastNameView1" MaxLength="40" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Mobile Phone :</label>
                                    <asp:TextBox ID="txtMobilePhoneView1" MaxLength="50" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Home Phone :</label>
                                    <asp:TextBox ID="txtHomePhoneView1" MaxLength="50" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Email :</label>
                                    <asp:TextBox ID="txtEmailView1" MaxLength="40" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Credit Card :</label>
                                    <asp:TextBox ID="txtCreditCardView1" MaxLength="16" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Address :</label>
                                    <asp:TextBox ID="txtAddressView1" runat="server" MaxLength="250" CssClass="form-control" TextMode="MultiLine"></asp:TextBox>
                                </div>
                            </div>
                            <div class="col-lg-6" runat="server" visible="false" id="jd">
                                <div class="form-group has-feedback">
                                    <label>Join Date :</label>
                                    <asp:TextBox ID="txtJoin_DTView1" Enabled="true" runat="server" CssClass="form-control"></asp:TextBox>
                                    <span class="glyphicon glyphicon-calendar form-control-feedback" aria-hidden="true"></span>
                                    <ajax:CalendarExtender ID="cldJoin_DTView1" runat="server" TargetControlID="txtJoin_DTView1" Format="dd/MM/yyyy"></ajax:CalendarExtender>
                                </div>
                            </div>
                            <div class="col-lg-6" runat="server" visible="false" id="ed">
                                <div class="form-group">
                                    <label>Expire Date :</label>
                                    <asp:Label ID="lblExpireDateView1" runat="server" Text="--/--/----" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Status :</label>
                                    <asp:DropDownList ID="ddlStatusView1" runat="server" CssClass="form-control"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Last Login :</label>
                                    <asp:Label ID="lblLastLoginDateView1" runat="server" Text="" CssClass="form-control"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <asp:HiddenField ID="hdUser_id" runat="server" />
                        <asp:Button ID="btnSaveView1" runat="server" Text="SAVE" CssClass="btn btn-default" />&nbsp;
                        <asp:Button ID="btnBackView1" runat="server" Text="Cancel" CssClass="btn btn-default" />
                    </div>
                </div>

            </div>
                                    
        </asp:View>

        <asp:View ID="view2" runat="server">

            <div class="col-lg-10 col-lg-offset-1" style="margin-bottom:50px;">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <asp:Label ID="Label2" runat="server" Text="Add/Edit User"></asp:Label>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>User name :</label>
                                    <asp:Label ID="lblUserNameView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Password :</label>
                                    <asp:Label ID="lblpasswordView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Role :</label>
                                    <asp:Label ID="lblRoleNameView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Title Name :</label>
                                    <asp:Label ID="lblTitleNameView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>First Name :</label>
                                    <asp:Label ID="lblFirstNameView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Last Name :</label>
                                    <asp:Label ID="lblLastNameView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Mobile Phone :</label>
                                    <asp:Label ID="lblMobilePhoneView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Home Phone :</label>
                                    <asp:Label ID="lblHomePhoneView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Email :</label>
                                    <asp:Label ID="lblEmailView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Credit Card :</label>
                                    <asp:Label ID="lblCreditCardView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Address :</label>
                                    <asp:Label ID="lblAddressView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Join Date :</label>
                                    <asp:Label ID="lblJoinDate2View2" runat="server" CssClass="form-control-static" Text="--/--/----"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Expire Date :</label>
                                    <asp:Label ID="lblExpireDate2View2" runat="server" CssClass="form-control-static" Text="--/--/----"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Status :</label>
                                    <asp:Label ID="lblStatusView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group">
                                    <label>Last Login :</label>
                                    <asp:Label ID="lblLoginDateView2" runat="server" CssClass="form-control-static"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <asp:Button ID="btnBackView2" runat="server" Text="Back" Width="52px" CssClass="btn btn-default" />
                    </div>
                </div>
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script type="text/javascript">
        ActiveMenuIndex(1);
    </script>
</asp:Content>
